package com.parktech.sun.domain.model.industryinfo;

import com.parktech.sun.domain.model.BaseEntity;

import javax.persistence.*;

/**
 * User: Think
 * Date: 11-1-13
 * Time: 下午8:49
 */
@Entity
@DiscriminatorValue("")
public class IndustryInfoAttachment extends BaseEntity {
    
    private Long id;

    private String name;

    private IndustryInfo news;

    public IndustryInfoAttachment() {
    }

    public IndustryInfoAttachment(String originalFilename) {
        name = originalFilename;
    }

    public IndustryInfoAttachment(String originalFilename, IndustryInfo news) {
        name = originalFilename;
        this.news = news;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @ManyToOne
    public IndustryInfo getIndustryInfo() {
        return news;
    }

    public void setIndustryInfo(IndustryInfo news) {
        this.news = news;
    }
    
}
